<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:68:"/var/www/html/CRM/public/../application/admin/view/phone/person.html";i:1540950045;}*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>行家-有点</title>
<link rel="stylesheet" type="text/css" href="/admin/css/css.css" />
<script type="text/javascript" src="/admin/js/jquery.min.js"></script>
 <!--<script type="text/javascript" src="js/page.js" ></script> -->
<script type="text/javascript" src="/admin/layer/layer.js"></script>
</head>
<style>
	.buttone{
		display: inline-block;
		padding: 1% 1.5%;
		color: white;
		background: #47a4e1;
		border: none;
		border-radius: 4px;
		position:relative;
		z-index: -1;
		font-size: 14px;
	}
	.pagination>li{
		float: left;
		text-align: center;
		border-radius: 5px;
	}
	.pagination>li:hover{
		background-color: #47a4e1;
	}
	.pagination>li:hover>span{
		color: white;
	}
	.pagination>li>a{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination>li>span{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		color: #47a4e1;
		font-weight: bold;
		font-size: 18px;
	}
	.pagination>li.disabled{
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination{
		width:50%;
		height: 100%;
		margin: 0 auto;
	}
</style>

<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">电话部</a>&nbsp;-</span>&nbsp;人员管理
			</div>
		</div>

		<div class="page">
			<!-- banner页面样式 -->
			<div class="connoisseur">
				<div class="conform">
						<div class="cfD">
							<a class="addA" style="margin-top: 0;margin-left: 0;" href="<?php echo url('admin/phone/add'); ?>">添加 + </a>
						</div>
				</div>
				<!-- banner 表格 显示 -->
				<div class="conShow">
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="135px" class="tdColor tdC">序号</td>
							<td width="135px" class="tdColor">姓名</td>
							<td width="145px" class="tdColor">联系电话</td>
							<td width="140px" class="tdColor">入职时间</td>
							<td width="140px" class="tdColor">备注</td>
							<td width="130px" class="tdColor">操作</td>
						</tr>
						<?php if(is_array($result) || $result instanceof \think\Collection || $result instanceof \think\Paginator): $i = 0; $__LIST__ = $result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
						<tr height="40px">
							<td><?php echo $key+1; ?></td>
							<td><?php echo $vo['user_name']; ?></td>
							<td><?php echo $vo['user_phone']; ?></td>
							<td><?php echo $vo['user_createtime']; ?></td>
							<td><?php echo $vo['user_text']; ?></td>
							<td>
								<a href="<?php echo url('admin/phone/person_update',['user_id'=>$vo['user_id']]); ?>">
									<button class="buttone">修改</button></a>
								<a onclick="delban(this,'<?php echo $vo['user_id']; ?>')" href="javascript:;"><button class="buttone">删除</button></a>
							</td>
						<?php endforeach; endif; else: echo "" ;endif; ?>
					</table>
				</div>
				<!-- banner 表格 显示 end-->
			</div>
			<!-- banner页面样式end -->
		</div>

	</div>


</body>

<script type="text/javascript">
// 广告弹出框
 function delban(that,id) {
	 var that = $(that);
     layer.confirm('确认要删除吗？', function () {
         $.get("<?php echo url('admin/phone/delete'); ?>", {'user_id': id}, function (data) {
             console.log(data);
             if (data == 200) {
                 that.parent().parent().remove();
                 layer.msg('已删除!', {icon: 1, time: 1000});
             } else{
                 layer.msg('删除失败!', {icon: 5, time: 1000});
             }
         })
     });
 }
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
// 广告弹出框 end
</script>
</html>